package org.dromara.business.modules.services.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.business.modules.services.domain.BuServices;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;

import java.math.BigDecimal;

/**
 * 服务信息业务对象 bu_services
 *
 * @author ckk
 * @date 2025-10-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BuServices.class, reverseConvertGenerate = false)
public class BuServicesBo extends BaseEntity {

    /**
     * 服务ID
     */
    @NotNull(message = "服务ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 服务标题
     */
    @NotBlank(message = "服务标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 服务分类ID
     */
    @NotNull(message = "服务分类ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long categoryId;

    /**
     * 服务简介（一句话）
     */
    @NotBlank(message = "服务简介（一句话）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String intro;

    /**
     * 服务详细内容
     */
    @NotBlank(message = "服务详细内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String content;

    /**
     * 服务价格
     */
    private BigDecimal price;

    /**
     * 价格是否面议：0-否，1-是
     */
    @NotNull(message = "价格是否面议：0-否，1-是不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer priceNegotiable;

    /**
     * 服务图片(多个逗号拼接)
     */
    @NotBlank(message = "服务图片不能为空", groups = { AddGroup.class, EditGroup.class })
    private String pics;

    /**
     * 服务地区
     */
    @NotBlank(message = "服务地区不能为空", groups = { AddGroup.class, EditGroup.class })
    private String location;

    /**
     * 联系人姓名
     */
    @NotBlank(message = "联系人姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String contactName;

    /**
     * 联系电话
     */
    @NotBlank(message = "联系电话不能为空", groups = { AddGroup.class, EditGroup.class })
    private String contactPhone;

    /**
     * 状态：0-已发布，1-待审核，2-已下架
     */
    // @NotNull(message = "状态：0-已发布，1-待审核，2-已下架不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;

    /**
     * 浏览次数
     */
    private Integer viewCount;

    /**
     * 咨询次数
     */
    private Integer inquiryCount;


}
